package com.example.servicedemo;

import android.app.Service;
import android.content.Intent;
import android.os.Handler;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;

public class MySampleService extends Service {
    public MySampleService() {
    }
    @Override
    public IBinder onBind(Intent intent) {
        return mBinder;
    }
    SampleStudentInterface.Stub mBinder = new SampleStudentInterface.Stub() {
        @Override
        public int getStudentId(String name) throws RemoteException {
            if (name.equals( "helloworld")) {
                return  0;
            }else {
                return  10;
            }
        }
    };
}
